package com.sinothk.gpserver.modules.biz.service.impl;

import com.sinothk.gpserver.modules.biz.entity.RoomEntity;
import com.sinothk.gpserver.modules.biz.entity.ScoreAdminLogEntity;
import com.sinothk.gpserver.modules.biz.mapper.ScoreAdminLogMapper;
import com.sinothk.gpserver.modules.biz.service.IScoreAdminLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sinothk.gpserver.util.PageDataUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.sinothk.server.support.entity.PageData;
import com.sinothk.server.support.entity.PageVo;

/**
 * <p>
 * 管理员积分交易记录 服务实现类
 * </p>
 *
 * @author Liang Y.t.
 * @since 2021-08-29
 */
@Service
public class ScoreAdminLogServiceImpl extends ServiceImpl<ScoreAdminLogMapper, ScoreAdminLogEntity> implements IScoreAdminLogService {

    @Resource
    private ScoreAdminLogMapper scoreAdminLogMapper;

    /**
     * 查询分页数据
     *
     * @param pageVo 分页参数
     * @return PageData
     */
    @Override
    public PageData<ScoreAdminLogEntity> page(PageVo<ScoreAdminLogEntity> pageVo) {
        Page<ScoreAdminLogEntity> page = new Page<>(pageVo.getPageNum(), pageVo.getPageSize());
        IPage<ScoreAdminLogEntity> iPage = scoreAdminLogMapper.selectPage(page, null);

        return new PageDataUtil<ScoreAdminLogEntity>().create(iPage);
    }

}
